<?php /*a:2:{s:92:"D:\PHP\phpstudy_pro\WWW\shixun24\zmtApp\public/themes/admin_simpleboot3/app\goods\index.html";i:1718932475;s:90:"D:\PHP\phpstudy_pro\WWW\shixun24\zmtApp\public/themes/admin_simpleboot3/public\header.html";i:1690974980;}*/ ?>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <!-- Set render engine for 360 browser -->
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <!-- HTML5 shim for IE8 support of HTML5 elements -->
    <!--[if lt IE 9]>
    <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
    <![endif]-->


    <link href="/themes/admin_simpleboot3/public/assets/themes/<?php echo cmf_get_admin_style(); ?>/bootstrap.min.css" rel="stylesheet">
    <link href="/themes/admin_simpleboot3/public/assets/simpleboot3/css/simplebootadmin.css" rel="stylesheet">
    <link href="/static/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">
    <!--[if lt IE 9]>
    <script src="https://cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
    <style>
        form .input-order {
            margin-bottom: 0px;
            padding: 0 2px;
            width: 42px;
            font-size: 12px;
        }

        form .input-order:focus {
            outline: none;
        }

        .table-actions {
            margin-top: 5px;
            margin-bottom: 5px;
            padding: 0px;
        }

        .table-list {
            margin-bottom: 0px;
        }

        .form-required {
            color: red;
        }

        .td-actions .btn {
            margin-bottom: 2px;
            min-width: 96px;
            text-align: center;
        }

        .td-actions .btn:last-child {
            margin-bottom: 0;
        }
        a:hover, a:focus{
            text-decoration: none;
        }
    </style>
    <?php 
		$is_mobile=cmf_is_mobile();
        $_static_version='1.0.4';
        $cmf_version=cmf_version();
        if (strpos(cmf_version(), '6.') === 0) {
            $_app=app()->http->getName();
        }else{
            $_app=request()->module();
        }
     ?>
    <script type="text/javascript">
        //全局变量
        var GV = {
            ROOT: "/",
            WEB_ROOT: "/",
            JS_ROOT: "static/js/",
            APP: '<?php echo $_app; ?>'/*当前应用名*/,
            IS_MOBILE: <?php echo !empty($is_mobile) ? 'true'  :  'false'; ?>
        };
    </script>
    <script src="/themes/admin_simpleboot3/public/assets/js/jquery-1.12.4.min.js"></script>
    <script src="/themes/admin_simpleboot3/public/assets/js/jquery-migrate-1.4.1.min.js"></script>
<!--    <script src="/themes/admin_simpleboot3/public/assets/js/jquery-3.6.0.min.js"></script>-->
    <script src="/static/js/wind.js"></script>
    <script src="/themes/admin_simpleboot3/public/assets/js/bootstrap.min.js"></script>
    <script>
        Wind.css('artDialog');
        Wind.css('layer');
        $(function () {
            $("[data-toggle='tooltip']").tooltip({
                container: 'body',
                html: true,
            });
            $("li.dropdown").hover(function () {
                $(this).addClass("open");
            }, function () {
                $(this).removeClass("open");
            });
        });
    </script>
    <?php if(APP_DEBUG): ?>
        <style>
            #think_page_trace_open {
                z-index: 9999;
            }
        </style>
    <?php endif; ?>

</head>
<body>
	<div class="wrap js-check-wrap">
		<ul class="nav nav-tabs">
			<li class="active"><a>商品管理</a></li>
			<li><a href="<?php echo url('Goods/add'); ?>">商品添加</a></li>
		</ul>
        <form class="well form-inline margin-top-20" method="get" action="<?php echo url('Goods/index'); ?>">
            <input type="text" class="form-control" name="name" style="width: 150px;" value="<?php echo input('request.name',''); ?>" placeholder="请输入商品名称">
            <input type="submit" class="btn btn-primary" value="搜索" />
            <a class="btn btn-danger" href="<?php echo url('Goods/index'); ?>">清空</a>
        </form>
		<table class="table table-hover table-bordered">
			<thead>
				<tr>
					<th width="50">ID</th>
					<th>商品封面</th>
					<th>商品名称</th>
					<th>商品图片</th>
					<th>跳转链接</th>
					<th>类型</th>
					<th>状态</th>
					<th>上架时间</th>
					<th>修改时间</th>
					<th width="140">操作</th>
				</tr>
			</thead>
			<tbody>
				<?php $user_statuses=array("0"=>lang('USER_STATUS_BLOCKED'),"1"=>lang('USER_STATUS_ACTIVATED'),"2"=>lang('USER_STATUS_UNVERIFIED')); if(is_array($Goods) || $Goods instanceof \think\Collection || $Goods instanceof \think\Paginator): if( count($Goods)==0 ) : echo "" ;else: foreach($Goods as $key=>$vo): ?>
				<tr>
					<td><?php echo $vo['id']; ?></td>
					<td><img class="img-thumbnail" onclick="imagePreviewDialog(this.src)" width="50px" src="/upload/<?php echo $vo['image']; ?>"></td>
					<td><?php echo $vo['name']; ?></td>
					<td>
						<?php if(is_array($vo['images']) || $vo['images'] instanceof \think\Collection || $vo['images'] instanceof \think\Paginator): if( count($vo['images'])==0 ) : echo "" ;else: foreach($vo['images'] as $key=>$img): ?>
							<img class="img-thumbnail" onclick="imagePreviewDialog(this.src)" width="50px" src="/upload/<?php echo $img; ?>">
						<?php endforeach; endif; else: echo "" ;endif; ?>
						</td>
					<td><?php echo $vo['url']; ?></td>
					<td><?php echo $vo['type']; ?></td>
					<td>
						<?php if($vo['switch'] == 0): ?>
							无货
						<?php endif; if($vo['switch'] == 1): ?>
							正常
						<?php endif; if($vo['switch'] == 2): ?>
							下架
						<?php endif; ?>

					</td>
					<td><?php echo $vo['create_time']; ?></td>
					<td><?php echo $vo['update_time']; ?></td>
                    <td width="180px">
						<a class="btn btn-xs btn-primary" href="javascript:void(0);" onclick="openIframeLayer('getAttrVal?id=<?php echo $vo['id']; ?>','配置商品属性',{area:['60%','80%']})">商品属性配置</a>
<!--						<div class="btn-group" role="group">-->
<!--							<button type="button" class="btn btn-default btn-xs dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">-->
<!--								商品配置<span class="caret"></span>-->
<!--							</button>-->
<!--							<ul class="dropdown-menu">-->
<!--								<li>-->
<!--									<a href="javascript:void(0);" onclick="openIframeLayer('addAttr?id=<?php echo $vo['id']; ?>','配置商品属性',{area:['60%','80%']})">配置属性</a>-->
<!--								</li>-->
<!--								<li>-->
<!--									<a href="javascript:void(0);" onclick="openIframeLayer('addAttrVal?id=<?php echo $vo['id']; ?>','配置商品属性值',{area:['60%','80%']})">配置商品属性值</a>-->
<!--								</li>-->
<!--							</ul>-->
<!--						</div>-->
                        <a class="btn btn-xs btn-primary" href='<?php echo url("Goods/edit",["id" => $vo["id"]]); ?>'>编辑</a>

                        <a class="btn btn-xs btn-danger js-ajax-delete" href='<?php echo url("Goods/del",["id" => $vo["id"]]); ?>'>删除</a>


					</td>
				</tr>
				<?php endforeach; endif; else: echo "" ;endif; ?>
			</tbody>
		</table>
		<div style="width: 100%;display: flex;justify-content: center;" class="pagination"><?php echo $Goods->render(); ?></div>
		<div>共有 <?php echo $Goods->total(); ?> 条数据，每页显示 <?php echo $Goods->listRows(); ?> 条，当前第 <?php echo $Goods->currentPage(); ?> 页，共 <?php echo $Goods->lastPage(); ?> 页。</div>

	</div>
	<script src="/static/js/admin.js?v=<?php echo $_static_version; ?>"></script>
</body>
</html>
